﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="cardata.aspx.vb" Inherits="WebApplication1.cardata" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .auto-style1 {
            width: 434px;
            height: 65px;
        }
        .auto-style2 {
            width: 481px;
            height: 52px;
        }
        .auto-style3 {
            width: 322px;
            height: 64px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
    <asp:HyperLink ID="hlEdit" runat="server" NavigateUrl='<%# Eval("ID", "cardetail.aspx?ID={0}")%>' ImageUrl='<%# Eval("Image") %>'></asp:HyperLink><br />
    <br />
    <br />
    <img alt="useruploads" class="auto-style1" src="Images/userupload.png" /><br />
<strong>
<br />
Here are some of our user submissions from our beloved fans! click on the image, and browse the technical specification, and feel free to leave a comment!</strong><br />
    <asp:SqlDataSource ID="TagsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:CarDataString %>" ProviderName="<%$ ConnectionStrings:CarDataString.ProviderName %>" SelectCommand="SELECT [Tag] FROM [tags]"></asp:SqlDataSource>
    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" GroupItemCount="3">
       <AlternatingItemTemplate>
      <td id="Td1" runat="server" style="background-color:#FFF8DC;">
        <asp:Label ID="Image" runat="server"  />
        <a href='<%# Eval("ID", "cardetail.aspx?ID={0}") %>' >
            <img src='<%# Eval("Image") %>' height="230" width="400" />
        </a>
        <br />
    </td>
</AlternatingItemTemplate>
                <EditItemTemplate>
            <td runat="server" style="background-color:#008A8C;color: #FFFFFF;">Image:
                <asp:TextBox ID="ImageTextBox" runat="server" Text='<%# Bind("Image") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                <br /></td>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                <tr>
                    <td>No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <EmptyItemTemplate>
<td runat="server" />
        </EmptyItemTemplate>
        <GroupTemplate>
            <tr id="itemPlaceholderContainer" runat="server">
                <td id="itemPlaceholder" runat="server"></td>
            </tr>
        </GroupTemplate>
        <InsertItemTemplate>
            <td runat="server" style="">Image:
                <asp:TextBox ID="ImageTextBox" runat="server" Text='<%# Bind("Image") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                <br /></td>
        </InsertItemTemplate>
        <ItemTemplate>
           <td id="Td2" runat="server" style="background-color:#FFF8DC;">
        <asp:Label ID="Image" runat="server"  />
        <a href='<%# Eval("ID", "cardetail.aspx?ID={0}") %>' >
            <img src='<%# Eval("Image") %>' height="230" width="400" />
        </a>
        <br />
    </td>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table id="groupPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr id="groupPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                        <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowLastPageButton="True" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <td runat="server" style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">Image:
                <asp:Label ID="ImageLabel" runat="server" Text='<%# Eval("Image") %>' />
                <asp:HyperLink ID="hlEdit" runat="server" 
                NavigateUrl='<%# Eval("ID", "cardetail.aspx?ID={0}")%>'
  ImageUrl="~/Images/edit.png"></asp:HyperLink>
                <br /></td>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:CarDataString %>" ProviderName="<%$ ConnectionStrings:CarDataString.ProviderName %>" SelectCommand="SELECT [Image] FROM [carclub]"></asp:SqlDataSource>
    <br />
    <br />
    <img alt="carinfo" class="auto-style2" src="Images/car-information.png" /><br />
<strong>
<br />
Here we have the data catalog of users uploads. This contains all the detailed information about the vehicle. </strong><br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" InsertVisible="False" ReadOnly="True" />
        <asp:BoundField DataField="Car Make" HeaderText="Car Make" SortExpression="Car Make" />
        <asp:BoundField DataField="Model" HeaderText="Model" SortExpression="Model" />
        <asp:BoundField DataField="Age" HeaderText="Age" SortExpression="Age" />
        <asp:BoundField DataField="Engine Size" HeaderText="Engine Size" SortExpression="Engine Size" />
        <asp:BoundField DataField="Origin" HeaderText="Origin" SortExpression="Origin" />
        <asp:BoundField DataField="BHP" HeaderText="BHP" SortExpression="BHP" />
        <asp:BoundField DataField="Layout" HeaderText="Layout" SortExpression="Layout" />
        <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
        <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="cardetail.aspx?ID={0}" HeaderText="More Details" Text="Details" />
    </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle ForeColor="White" HorizontalAlign="Center" BackColor="#284775" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CarDataString %>" ProviderName="<%$ ConnectionStrings:CarDataString.ProviderName %>" SelectCommand="SELECT * FROM [carclub]"></asp:SqlDataSource>
<br />
    <img alt="usrtags" class="auto-style3" src="Images/Untitled-1.png" /><br />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="TagsDataSource" Height="23px" Width="130px" CellPadding="4" style="color: #663300" ForeColor="#333333" GridLines="None">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="Tag" DataNavigateUrlFormatString="CarByTags.aspx?Tag={0}" DataTextField="Tag" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle ForeColor="White" HorizontalAlign="Center" BackColor="#284775" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>
